<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/WEB-INF/template/common/header.jsp"%>
<c:if test="${not empty model.targetUrlCount}"></c:if>
<script type="text/javascript">
	$(function() {
		var msg = "目标URL数：${model.targetUrlCount} 下一页URL数: ${model.nextUrlCount}";
		alertMsg.info(msg);
	})
</script>
<div class="pageContent" style="padding: 5px">
	<div class="panel" defH="40">
		<h1>标签检测</h1>
		<div>
			<ul>
				<li><a class="button" target="dialog" mask="true"
					href="${base }/spider_check!add.action" width="700"><span>添加检测</span></a></li>
				<c:if test="${not empty model.targetUrlCount}">
					<span></span>
				</c:if>
				<c:if test="${not empty model.nextUrlCount}">
					<span>下一页URL数：${model.nextUrlCount }</span>
				</c:if>
			</ul>
		</div>
	</div>
	<div class="divider"></div>
	<div class="tabs">
		<div class="tabsHeader">
			<div class="tabsHeaderContent">
				<ul>
					<li><a href="javascript:;"><span>返回结果</span></a></li>
				</ul>
			</div>
		</div>
		<div class="tabsContent">
			<div>
				<div id="index-list-box" class="unitBox">
					<table class="table" width="100%" layoutH="170">
						<thead>
							<tr>
								<th width="20">URL</th>
								<th width="20">名称</th>
								<th width="50">XPATH</th>
								<th width="50">属性</th>
								<th width="50">值</th>
							</tr>
						</thead>
						<tbody>
							<c:forEach var="field" items="${model.fields}">
								<tr>
									<td>${field.targetUrl}</td>
									<td>${field.name}</td>
									<td>${field.xpath}</td>
									<td>${field.attr}</td>
									<td><c:choose>
											<c:when test="${fn:length(field.val) > 50}">
												<c:out value="${fn:substring(field.val, 0, 50)}......" />
											</c:when>
											<c:otherwise>
												<c:out value="${field.val}" />
											</c:otherwise>
										</c:choose></td>
								</tr>
							</c:forEach>
						</tbody>
					</table>
				</div>
			</div>
		</div>
		<div class="tabsFooter">
			<div class="tabsFooterContent"></div>
		</div>
	</div>
</div>